<?php
namespace App\Models;

use Illuminate\Database\Eloquent\Model;

//用户模型
class NewsDianping extends Model
{
    protected $table = 'news_dianping';

    public $timestamps = false;
    //白名单
    protected $fillable = [
        'dianping_id',
        'news_id',
        'userid',
        'dianping_contents',
        'create_date',
        'show',
    ];

    //和用户表建立关联
    public function member()
    {
        return $this->hasOne('App\\Models\\User', 'userID', 'userid');
    }
}
